/*
 * @Author: scopesang
 * @Date: 2022-04-08 09:40:31
 * @LastEditors: scopesang
 * @LastEditTime: 2022-04-08 10:14:16
 * @FilePath: \cms-manage\src\textApp\App03Tab.jsx
 * @Description: 
 * 
 * Copyright (c) 2022 by scopesang/大鹏科技, All Rights Reserved. 
 */
import React, { Component } from 'react'

export default class App03Tab extends Component {
    state = {
        arr: [
            { id: 1, txt: '6月25日峡谷龙舟赛挑战局数异常修复公告', time: '06/25' },
            { id: 2, txt: '6月25日峡谷龙舟赛挑战局数异常说明', time: '06/25' },
            { id: 3, txt: '6月25日体验服停机更新公告', time: '06/25' },
            { id: 4, txt: '6月24日峡谷龙舟赛异常修复公告', time: '06/24' },
            { id: 5, txt: '6月24日“演员”惩罚名单', time: '06/24' },
            { id: 6, txt: '6月24日外挂专项打击公告', time: '06/24' }
        ]
    }

    delItem(index) {
        let arr = JSON.parse(JSON.stringify(this.state.arr))
        arr.splice(index, 1)
        this.setState({
            arr
        })
    }
    render() {
        return (
            <div>
                <ul>
                    {this.state.arr.map((item, index) => {
                        return (
                            <li key={item.id} onClick={this.delItem.bind(this, index)}>
                                <div>{item.txt}</div>
                                <div>{item.time}</div>
                            </li>
                        )
                    })}

                </ul>
            </div>
        )
    }
}
